from django.db import models


class Student(models.Model):
    sno = models.CharField(verbose_name="学号" ,primary_key=True, max_length=100, null=False, blank=False)
    name = models.CharField(verbose_name="姓名", max_length=100, null=False, blank=False)
    gender = models.CharField(verbose_name="性别", max_length=100, null=False, blank=False)
    dept = models.CharField(verbose_name="部门", max_length=100, null=False, blank=False)
    position = models.CharField(verbose_name="职位", max_length=100, null=False, blank=False)
    birthday = models.DateField(verbose_name="出生日期", max_length=100, null=True, blank=True, default=None)
    mobile = models.CharField(verbose_name="手机号码", max_length=100, null=True, blank=True, default=None)
    email = models.CharField(verbose_name="邮箱地址", max_length=100, null=True, blank=True, default=None)
    address = models.CharField(verbose_name="家庭住址", max_length=200, null=True, blank=True, default=None)
    image = models.CharField(verbose_name="照片", max_length=200, null=True, blank=True, default=None)

    class Meta:
        managed = True
        app_label = "studentweb"
        db_table = "Student"